package com.jindy.module.statement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jindy.module.statement.mapper.MaintenanceCostMapper;
import com.jindy.module.statement.domain.MaintenanceCost;
import com.jindy.module.statement.service.IMaintenanceCostService;

/**
 * 维修、配件费用Service业务层处理
 *
 * @author ruoyi
 * @date 2022-10-27
 */
@Service
public class MaintenanceCostServiceImpl implements IMaintenanceCostService
{
    @Autowired
    private MaintenanceCostMapper maintenanceCostMapper;

    /**
     * 查询维修、配件费用
     *
     * @param id 维修、配件费用主键
     * @return 维修、配件费用
     */
    @Override
    public MaintenanceCost selectMaintenanceCostById(Long id)
    {
        return maintenanceCostMapper.selectMaintenanceCostById(id);
    }

    /**
     * 查询维修、配件费用列表
     *
     * @param maintenanceCost 维修、配件费用
     * @return 维修、配件费用
     */
    @Override
    public List<MaintenanceCost> selectMaintenanceCostList(MaintenanceCost maintenanceCost)
    {
        return maintenanceCostMapper.selectMaintenanceCostList(maintenanceCost);
    }

    /**
     * 新增维修、配件费用
     *
     * @param maintenanceCost 维修、配件费用
     * @return 结果
     */
    @Override
    public int insertMaintenanceCost(MaintenanceCost maintenanceCost)
    {
        return maintenanceCostMapper.insertMaintenanceCost(maintenanceCost);
    }

    /**
     * 修改维修、配件费用
     *
     * @param maintenanceCost 维修、配件费用
     * @return 结果
     */
    @Override
    public int updateMaintenanceCost(MaintenanceCost maintenanceCost)
    {
        return maintenanceCostMapper.updateMaintenanceCost(maintenanceCost);
    }

    /**
     * 批量删除维修、配件费用
     *
     * @param ids 需要删除的维修、配件费用主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceCostByIds(Long[] ids)
    {
        return maintenanceCostMapper.deleteMaintenanceCostByIds(ids);
    }

    /**
     * 删除维修、配件费用信息
     *
     * @param id 维修、配件费用主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceCostById(Long id)
    {
        return maintenanceCostMapper.deleteMaintenanceCostById(id);
    }
}
